package com.sneaker.shower.entity.enums;

import java.util.Arrays;

/**
 * 产品服务分类枚举
 */
public enum ShoesServiceEnum {
    REPAIR("球鞋修复", Byte.valueOf("0")),
    CLEAN("球鞋清洗", Byte.valueOf("1"));
    private String message;
    private Byte code;

    ShoesServiceEnum(String message, Byte code) {
        this.message = message;
        this.code = code;
    }

    public static ShoesServiceEnum getByCode(Byte code) {
        return Arrays.stream(values()).filter((e) -> e.getCode().equals(code)).findFirst().orElse(null);
    }

    public String getMessage() {
        return message;
    }

    public Byte getCode() {
        return code;
    }

}
